fix case where initial colormap entry is Transparent.
authorJonathan Blandford <jrb@redhat.com>
Sun, 20 Feb 2000 03:08:00 +0000 (03:08 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Sun, 20 Feb 2000 03:08:00 +0000 (03:08 +0000)
2000-02-19  Jonathan Blandford  <jrb@redhat.com>

* gdk-pixbuf/io-gif.c (new_context): fix case where initial
colormap entry is Transparent.

gdk-pixbuf/ChangeLog
gdk-pixbuf/io-gif.c

index d3b6f0805c5453a0b6891adddbd3011ed8b70e86..a78beb6bb2846809b1a70a25b2c3338ecac9d9e0 100644 (file)
@@ -1,3 +1,8 @@
+2000-02-19  Jonathan Blandford  <jrb@redhat.com>
+
+       * gdk-pixbuf/io-gif.c (new_context): fix case where initial
+       colormap entry is Transparent.
+
 2000-02-19  Owen Taylor  <otaylor@redhat.com>
 
        * gdk-pixbuf/pixops/pixops.c (scale_pixel): Fix error in
index d566af1bbb257f0d91d0d95d4ef9435ea6984bec..1f139831677d268790f476db8fbda557bc6e66a3 100644 (file)
@@ -354,7 +354,7 @@ gif_get_extension (GifContext *context)
                                if ((context->block_buf[0] & 0x1) != 0) {
                                        context->gif89.transparent = context->block_buf[3];
                                } else {
-                                       context->gif89.transparent = FALSE;
+                                       context->gif89.transparent = -1;
                                }
                        }
 
@@ -607,7 +607,7 @@ gif_fill_in_pixels (GifContext *context, guchar *dest, gint offset, guchar v)
 {
        guchar *pixel = NULL;
 
-       if (context->gif89.transparent) {
+       if (context->gif89.transparent != -1) {
                pixel = dest + (context->draw_ypos + offset) * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 4;
                *pixel = context->color_map [0][(guchar) v];
                *(pixel+1) = context->color_map [1][(guchar) v];
@@ -667,7 +667,7 @@ gif_get_lzw (GifContext *context)
 
        if (context->pixbuf == NULL) {
                context->pixbuf = gdk_pixbuf_new (ART_PIX_RGB,
-                                                 context->gif89.transparent,
+                                                 context->gif89.transparent != -1,
                                                  8,
                                                  context->width,
                                                  context->height);
@@ -714,7 +714,7 @@ gif_get_lzw (GifContext *context)
                }
                bound_flag = TRUE;
 
-               if (context->gif89.transparent) {
+               if (context->gif89.transparent != -1) {
                        temp = dest + context->draw_ypos * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 4;
                        *temp = context->color_map [0][(guchar) v];
                        *(temp+1) = context->color_map [1][(guchar) v];